package com.zmn.plat.common.dictionary;

/**
 * 品牌系数价格类型枚举
 *
 * @author linfeng
 * @since 2020/06/15 14:56:30
 */
public enum BaseBrandPriceTypeEnum {

    /**
     * values
     */
    PRICE(1, "销售价"),
    INNERPRICE(2, "内部价"),
    ;

    private Integer code;
    private String name;

    BaseBrandPriceTypeEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public Integer getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static BaseBrandPriceTypeEnum of(Integer code) {
        if (code == null || code == 0) {
            return PRICE;
        }
        switch (code) {
            case 1:
                return PRICE;
            case 2:
                return INNERPRICE;
            default:
                return PRICE;
        }
    }
}
